package com.future.tenant;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class TenantHolder {

    private static final ThreadLocal<Long> THREAD_LOCAL = new ThreadLocal<>();

    public static void setTenant(Long tenant) {
        THREAD_LOCAL.set(tenant);
    }

    public static Long getTenant() {
        return THREAD_LOCAL.get();
    }

    public static void clear() {
        THREAD_LOCAL.remove();
    }

}
